import React from 'react'
import loginInfo from './loginInfo'
// import qs from 'query-string'
export default function Login({ location, history }) {
    return (
        <div>
            <h1>登录授权页</h1>
            {/* <button onClick={() => {
                const sear = qs.parse(location.search);
                loginInfo.login()
                history.push(sear.prev || '/')
            }}>登录</button> */}
            <button onClick={() => {
                loginInfo.login()
                history.push(location.state || '/')
            }}>登录</button>
        </div>
    )
}
